package com.yami.shop.rights.common.strategy;

import com.alibaba.fastjson.JSONObject;
import com.yami.shop.bean.event.AddRightsEvent;
import com.yami.shop.bean.event.TransferRightsEvent;
import com.yami.shop.rights.common.dto.PersonRightsDto;
import com.yami.shop.rights.common.model.ProdRights;

import java.util.List;

public interface PersonRightsStrategy {

    // 权益类型
    String rightsType();

    // 保存接口
    void savePersonRightsData(ProdRights dto);

    // 查询剩余次数
    Long getSurplusTimes(long id);

    // 新增权益接口
    void addPersonRights(ProdRights prodRights, AddRightsEvent event, long personRightsId);

    // 核销接口
    List<PersonRightsDto> verificationRights(JSONObject qrCodeData);

    // 权益转移 -- 通过持仓 转移
    void updatePersonRights(Long rights,String personRightsId,String userId,String toUserId);

    // 取消处理
    void cancelOrder(Long orderNumber);

    // 过期处理
    void updateRightsEffective(List<Long> rightsId);

    void rightsTransfer(TransferRightsEvent event);
}
